package com.ltmonitor.jt808.protocol;

import org.apache.log4j.Logger;

/**
 * 终端请求地址应答
 */
public class JT_B004 implements IMessageBody{
    private static Logger logger = Logger.getLogger(JT_B004.class);

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    private String address;


    @Override
    public byte[] WriteToBytes() {

        MyBuffer buff = new MyBuffer();
        buff.put(address);
        
        return buff.array();
    }

    @Override
    public void ReadFromBytes(byte[] messageBodyBytes) {
    }

    @Override
    public String toString() {
        StringBuilder sBuilder = new StringBuilder();
        sBuilder.append(String.format(
                "地址：%1$s",
                 this.address));
        return sBuilder.toString();
    }


}
